Conversation
|
@dotnet/razor-tooling for reviews please. |
| if (other is null || | ||
| CssScope != other.CssScope) | ||
| CssScope != other.CssScope || | ||
| PhysicalPath != other.PhysicalPath) |
There was a problem hiding this comment.
Should this compare using PlatformUtilities.OSSpecificComparer? Or, is it OK if a case-insensitive rename on Windows evicts the cached item?
There was a problem hiding this comment.
The casing of the filename actually flows through to the component name, which is case sensitive.
Counter.razor and CouNter.razor produce <Counter /> and <CouNter /> respectively and they won't match as valid components if the casing doesn't also match.
So it's correct that we should evict with a case sensitive rename, as its effectively now a different component.
I should add a test to cover that. Will do so.
There was a problem hiding this comment.
Well that at least helps explain why tooling and compiler differ in their approaches to case sensitivity. I suspect tooling might have a few edge case bugs around this. I might log an issue
There was a problem hiding this comment.
Thanks for the explanation @chsienki! That was super helpful to me.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2566661
We had a caching bug where we wouldn't check the name of the additional file when considering if it had changed. That means that when renaming a file in VS, we don't update the host outputs, so when we try to find the generated document, it only contains an entry for the old name, not the new one.
This bug can also be worked around by the user by typing in the document, which causes it to be detected as different and brings the state back up to date.